Solving Goals in Equational Languages
نویسندگان
چکیده
Solving equations in equational Horn-clause theories is a programming paradigm that combines logic programming and functional programming in a clean manner. Languages like EQLOG, SLOG and RITE, express programs as conditional rewrite rules and goals as equations to be solved. Procedures for completion of conditional equational theories, in a manner akin to that of Knuth and Bendix for unconditional theories, also require methods for solving equations appearing in conditions. Rewrite-based logic-programming uses (conditional) narrowing to solve equational goals. Recently a different, topdown equation solving procedure was proposed for unconditional rewrite systems. In this paper, we express equational goal solving using conditional rules. Some refinements are described: the notion of operator derivability is used to prune useless paths in the search tree and our use of oriented goals eliminates some redundant paths leading to non-normalized solutions. Our goal-directed method can also be extended to handle conditional systems. I. Equational Programming Several proposed programming languages use conditional equations as a means of combining the main features of logic programming and functional programming; such languages include RITE [Dershowitz-Plaisted-85], SLOG [Fribourg-85], and EQLOG [Goguen-Meseguer-86]. In this paradigm, a program is a set of rules, that is, directed (conditional) equations, and a goal is the question whether an equation s = t has a solution in the equational theory presented by the program. Computing consists of finding values (substitutions) for the variables in s and t for which the equality holds. Efficient methods of solving equations are therefore very important. So, too, is the ability to detect that equations are unsatisfiable. * This research was supported in part by the National Science Foundation under Grant DCR 85-13417.
منابع مشابه
Goal-Directed Equation Solving
Solving equations in equational Horn-clause theories is a programming paradigm that combines logic programming and functional programming in a clean manner. Languages like E&LOG, SLOG and RITE, express programs as rewrite rules and use narrowing to solve goals expressed as equations. In this paper, we express equational goal solving by means of a logic program that simulates rewriting of terms....
متن کاملCombining Uniication and Built-in Constraints (extended Abstract)
In less than a decade, Deduction with Constraints (DwC) has opened a new universe in computer science. DwC can be viewed from two perspectives: one related to the automated deduction framework 17, 19], the other to the development and usage of programming languages based on logic 7, 14]. Within the automated deduction framework, constraints on the generic data structure \terms" have become a po...
متن کاملType Inference for Units of Measure
Units of measure are an example of a type system extension involving a nontrivial equational theory. Type inference for such an extension requires equational unification. This complicates the generalisation step required for let-polymorphism in ML-style languages, as variable occurrence does not imply dependency. Previous work on units of measure (by Kennedy in particular) integrated free abeli...
متن کاملHigher-Order Narrowing
We introduce several approaches for solving higher order equational problems by higher order narrow ing and give rst completeness results The results apply to higher order functional logic programming languages and to higher order uni cation modulo a higher order equational theory We lift the general notion of rst order narrow ing to so called higher order patterns and argue that the full highe...
متن کاملSolving higher order equations: from logic to programming
Higher order constructs provide the necessary level of abstraction for concise and natural formulations in many areas of computer science We present constructive methods for higher order equational reasoning with applications ranging from theorem proving to novel programming concepts A major problem of higher order programming is the undecidability of higher order uni cation In the rst part we ...
متن کامل